  {% include "header.html" %}
  <script type="text/javascript" >
    var tz = "{{ tz }}";
    var lang = "{{ lang }}";
  </script>
  <h1>Agency  List <a href="http://code.google.com/transit/spec/transit_feed_specification.html#agency_txt___Field_Definitions">Refer</a></h1>
  {% if prompt %}
  <p id="prompt">{{ prompt }}</p>
  {% endif %}
  <div id="editor">
    <form method="POST" action="{{ url }}" id="editorform">
      <table>
        <tr>
          <th>Items</th>
          <th>Values</th>
        </tr>
        <tr>
          <td>ID</td>
          <td><input name = "agency_id" id = "agency_id" type="TEXT" value="{{ agency.id }}"/></td>
        </tr>
        <tr>
          <td>Name</td>
          <td><input name = "agency_name" id = "agency_name" type="TEXT" value="{{ agency.name }}"/></td>
        </tr>
        <tr>
          <td>Time Zone</td>
          <td><select name = "agency_timezone" id = "agency_timezone" ></select></td>
        </tr>
        <tr>
          <td>Language</td>
          <td><select name = "agency_lang" id = "agency_lang"></select></td>
        </tr>
        <tr>
          <td>Phone</td>
          <td><input name = "agency_phone" id = "agency_phone" type="TEXT" value="{{ agency.phone }}"/></td>
        </tr>
        <tr>
          <td>Url</td>
          <td><input name = 'agency_url' id = "agency_url" type="TEXT" value="{{ agency.url }}"/></td>
        </tr>
        <tr>
          <td colspan="2">
            <input type="submit" id = "submit" value="{{ submit }}" name = "submit" />
          </td>
        </tr>
        </table>
  </form>


    </div>
<div class="sort">
  <form method="POST" action="" name="search">
    <input type="text" value=""/> <input type="submit" value="Search"/>
  </form>


    </div>
    <div class="pager">
      paging info: [<a href="#">1</a>] [<a href="#">2</a>] ... [<a href="#">last</a>] <input type="text" value="" size="4" maxlength="4"/> <input type="submit" value="Go" />
    </div>
    <table>
      <tr>
        <th>&nbsp;</th>
        <th>ID</th>
        <th>Name</th>
        <th>Time Zone</th>
        <th>Language</th>
        <th>Phone</th>
        <th>URL</th>
        <th>Subsidiary</th>
        <th>Action</th>
      </tr>
      {% for agency in agencies %}
      <tr>
        <td><input type="checkbox" name="deleteid" value="{{agency.id}}"/></td>
        <td>{{agency.id}}</td>
        <td>{{agency.name}}</td>
        <td>{{agency.timezone}}</td>
        <td>{{agency.lang}}</td>
        <td>{{agency.phone}}</td>
        <td>{{agency.url}}</td>
        <td><a href="/admin/route?agency_id={{agency.id}}">Routes</a></td>
        <td>
          <a href="/admin/agency?act=edit&id={{agency.id}}">Edit</a>&nbsp;
          <a href="/admin/agency?act=delete&id={{agency.id}}">Delete</a>
        </td>
      </tr>
      {% endfor %}
    </table>
    <div class="pager">
      [<a href="#">1</a>] [<a href="#">2</a>] ... [<a href="#">last</a>] <input type="text" value="" size="4" maxlength="4"/> <input type="submit" value="Go" />
    </div>
    <div class="control">
      <input type="submit" value="Delete All"/>
    </div>
  </body>
</html>
